package tx.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import tx.dao.BookDao;
import tx.service.BookService;
import tx.service.CheckoutService;

@Controller
public class BookController {
    @Autowired
    private BookService bookService;

    public void buyBook(int bookId, int userId) {
        bookService.buyBook(bookId,userId);
    }

    @Autowired
    private CheckoutService checkoutService;

    public void checkout(Integer[] bookIds, int userId) {
        checkoutService.checkout(bookIds,userId);
    }
}
